
package com.wwy.monitor.mapper.tddl;

import com.wwy.monitor.model.tddl.dto.MonitorReceiverDTO;
import com.wwy.monitor.model.tddl.query.MonitorReceiverQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author tianquan.ld
 * @version V1.0
 * <p>Description: çæ§æ¥æ¶è mapper</p>
 * @date 2019-10-29 15:59
 */
@Repository
public interface MonitorReceiverMapper {
    /**
     * æ°å»º
     *
     * @param entity
     * @return
     */
    int insert(MonitorReceiverDTO entity);

    /**
     * 批量添加
     *
     * @param list æ·»å æ°æ®
     * @return æ·»å æ¡æ°
     */
    int batchInsert(@Param("list") List<MonitorReceiverDTO> list);

    /**
     * å é¤
     *
     * @param id
     * @return
     */
    int deleteById(@Param("id") Long id);

    /**
     * æ ¹æ®éç½®è¯¦æidé»è¾å é¤
     *
     * @param detailId éç½®è¯¦æid
     * @return é»è¾å é¤æ¡æ°
     */
    int deleteByDetailId(@Param("detailId") Long detailId);

    /**
     * æ´æ°
     *
     * @param entity
     * @return
     */
    int updateById(MonitorReceiverDTO entity);

    /**
     * æ¥è¯¢è§å
     *
     * @return
     */
    List<MonitorReceiverDTO> selectByQuery(MonitorReceiverQuery query);

    /**
     * æ ¹æ®idæ¥è¯¢
     *
     * @param id
     * @return
     */
    MonitorReceiverDTO selectById(@Param("id") Long id);

    /**
     * æ»æ°
     *
     * @param query
     * @return
     */
    Integer count(MonitorReceiverQuery query);

    /**
     * æ ¹æ®éç½®è¯¦æidæ¥è¯¢æ¶æ¯æ¥æ¶äººä¿¡æ¯
     *
     * @param idList
     * @return
     */
    List<MonitorReceiverDTO> selectByDetailIds(@Param("idList") List<Long> idList);
}